package me.itsoo.artemis.framework.ioc.exception;

import me.itsoo.artemis.framework.core.util.StringUtils;

import java.lang.reflect.Method;

/**
 * WrongBeanDefinitionException
 *
 * @author zxy
 * @version 0.0.1
 * @since 2023/6/2
 */
public class WrongBeanDefinitionException extends RuntimeException {

    private static final long serialVersionUID = -2695553704585003401L;

    public WrongBeanDefinitionException(Method method) {
        super(StringUtils.format("The wrong of the bean definition: [{}#{}]",
                method.getDeclaringClass().getCanonicalName(), method.getName()));
    }

    @Override
    public synchronized Throwable fillInStackTrace() {
        return this;
    }
}
